Add integration tests with Cypress#9
Open
ajsaraujo wants to merge 11 commits intozoeesilcock:masterfrom
Open
Conversation
ajsaraujo
commented
Jun 2, 2022
Comment on lines
+7
to
+11
| "cypress:ci": "cypress run", | ||
| "cypress:dev": "cypress open", | ||
| "start-server": "grunt", | ||
| "test:dev": "start-server-and-test start-server http://localhost:8080 cypress:dev", | ||
| "test:ci": "start-server-and-test start-server http://localhost:8080 cypress:ci" |
Contributor
Author
There was a problem hiding this comment.
I tried to do this through Grunt, since it's what the project uses for all it's tasks, but I couldn't do it.
For Cypress to work, you need to run both the dev server and Cypress server in parallel. However, for parallel tasks support in Grunt, it seems you need to install a plugin, so I used this start-server-and-test library instead, which seemed to be simpler. Let me know what you think about it.
Once we get this task-running-setup-thing straight, if it interests you, we can also create a GitHub Action to run the tests (and other tasks, such as linting) against each pull request.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Adds some integration tests, made with Cypress.
npm run cypress:devto run them in headed modenpm run cypress:cito run them in headless modeVideo
mob-timer.spec.js.mp4